package com.shuqi.common;

import com.shuqi.database.dao.impl.VersionShowDao;
import com.shuqi.database.dao.impl.VersionShowDao.VersionShowEnum;

/**
 * 
 * @author li.li
 * @date 2014-6-10
 * 
 *       红点显示处理
 * 
 */
public class RedDotProvider {
    private static final RedDotProvider instance = new RedDotProvider();

    private RedDotProvider() {}

    public static RedDotProvider getInstance() {
        return instance;
    }

    /**
     * 判断是否显示小红点
     * 
     * @param nameEnum 版本显示功能分类枚举
     * @return false 不显示, true 显示
     */
    public boolean isShowRedDot(VersionShowEnum nameEnum) {
        return VersionShowDao.getInstance().isShow(nameEnum);

    }

    /**
     * 设置不显示小红点
     * 
     * @param nameEnum 版本显示功能分类枚举
     */
    public void hideRedDot(VersionShowEnum nameEnum) {
        VersionShowDao.getInstance().update(nameEnum);
    }
}
